package com.woniuxy.course.config;

import com.baomidou.mybatisplus.core.injector.*;
import com.baomidou.mybatisplus.extension.injector.*;
import com.baomidou.mybatisplus.extension.plugins.*;
import org.mybatis.spring.annotation.*;
import org.springframework.context.annotation.*;
import org.springframework.transaction.annotation.*;

/**
 * @author CodingMaster
 * @create 2020-07-23 10:50
 * @description
 */
@Configuration
@EnableTransactionManagement
@MapperScan("com.woniuxy.course.mapper")
public class MyConfig {
    /**
     * 逻辑删除插件
     */
    @Bean
    public ISqlInjector sqlInjector() {
        return new LogicSqlInjector();
    }

    /**
     * 分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
